import React, {Component} from 'react'
import {render} from 'react-dom'
import {Router, Route, IndexRoute, hashHistory} from 'react-router'
//引用样式
import './Scss/reset.scss'
import './scss/media.px'
import './scss/public.scss'


//引用组件
import Devices from './Comment/Devices'
import Map from './Comment/Map'

//定义一个公共的组件盒子
class Roots extends Component {
    componentWillMount() {
        //
    }
    render() {
        return (
            <div className='app'>{this.props.children}</div>
        );
    }
}
render((
    <Router history={hashHistory}>
        <Route path='/' component={Roots}>
            <Route path='map/:token(/:sign)' component={Devices}/>
            <Route path='mapDetail/:babyid/:babyname/:headimg' component={Map}/>
        </Route>
    </Router>
), document.getElementById('app'));
